#!/usr/bin/env bash

__rvm_detect_system_from_lsb_release()
{
  local __system_name="$( awk -F'=' '$1=="DISTRIB_ID"{print $2}' /etc/lsb-release | head -n 1 | tr '[A-Z]' '[a-z]' | tr -d \" )"

  case $__system_name in
    deepin*)        _system_name="Deepin";;
    elementary*)    _system_name="Elementary";;
    kali*)          _system_name="Kali";;
    linuxmint*)     _system_name="Mint";;
    manjarolinux*)  _system_name="Manjaro";;
    neon*)          _system_name="Ubuntu";;
    solus*)         _system_name="Solus";;
    trisquel*)      _system_name="Trisquel";;
    ubuntu*)        _system_name="Ubuntu";;
    zorin*)         _system_name="Ubuntu";;
    *)              return 1
  esac

  _system_version="$( awk -F'=' '$1=="DISTRIB_RELEASE"{print $2}' /etc/lsb-release | head -n 1 )"
  _system_arch="$( uname -m )"

  return 0
}
